using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerMoveState : PlayerGroundState
{
    public PlayerMoveState(Entity _entity, string _stateString) : base(_entity, _stateString)
    {
    }

    public override void Enter()
    {
        base.Enter();
    }

    public override void Exit()
    {
        base.Exit();

        player.SetZeroVelocity();
    }

    public override void Update()
    {
        base.Update();

        if (inputX == 0)
            player.stateMachine.ChangeState(player.idleState);
        else player.SetVelocity(inputX * player.speed, player.rb.velocity.y);
    }
}
